package com.xique.door.api;

import com.xique.common.core.constant.ServiceNameConstants;
import com.xique.common.core.domain.R;
import com.xique.door.api.factory.RemoteAppUserFallbackFactory;
import com.xique.door.api.model.LoginAppUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author shd
 * @create 2021/12/31 10:49
 */
@FeignClient(contextId = "RemoteAppUserService", value = ServiceNameConstants.DOOR_BIZ_SERVICE, fallbackFactory = RemoteAppUserFallbackFactory.class)
public interface RemoteAppUserService {

    /**
     * 通过用户名查询用户信息
     *
     * @param loginName 用户名
     * @return 结果
     */
    @GetMapping(value = "user/info/{loginName}")
    R<LoginAppUser> getUserInfo(@PathVariable("loginName") String loginName);
}
